<template>
  <div>
      <h3>Text2--hook</h3>
      <h4>
          {{ count }} -- <button @click="add">点我</button>
      </h4>
  </div>
</template>

<script>
// use开头的函数统称为hook
import { useCount } from '../hooks/count'
export default {
    setup() {
        const { count, add } = useCount()
        return {
            count,
            add
        }
    }
}
</script>

<style>

</style>